home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr36
/
famedemo.zip
/
LOGON.QAL
< prev
next >
Wrap
Text File
|
1994-11-19
|
8KB
|
301 lines
;==================================================================
;
; Logon.qal : QAL source file. Qaf is LOGON.QAF
; ========
;
; Originally written by eSoft
; Modified by Paul Blitz, John Schachat and Charles Barnett
;
;
;
; This QAL is for NEW callers to choose whether they want to
; Have ANSI and IBM characters and to set terminal defaults
;
;
;
;
;=================================================================
; QAL DEFINITION
;
; Logon
; ========
; Q&A to interactively set user's ANSI & IBM Graphics flags
; as well as screen length and width.
;
; Used both for new users, and as part of the utilities stuff
;
;
;
;=================================================================
;*************
Q&A: LOGON
;*************
Change: ANSI = . ; clear both to start with
Change: IBM = .
Clear:
Show: ""
Show: ""
Show: ""
Show: "ANSI Usage:"
Show: "==========="
Show: ""
If: %CANANSI% = "X" ;auto-check shows ansi capability
Show: "Our system has detected you are capable of supporting "
Show: "ANSI color and screen location sequences."
Else:
Show: "Your system may be able to use ANSI color and screen location "
Show: "sequences. Generally, if your emulation is set to ANSI, then you"
Show: "WILL be able to use ANSI. Certain other terminals / terminal"
Show: "emulations can also use ANSI."
Endif:
Show: ""
Show: "(If you are in any doubt whether your system will work properly"
Show: " ANSI enabled, then press a T now to run a test.)"
Show: ""
Show: ""
Show: ""
Show: "Would you like to use ANSI: Yes, No or Test it?"
Get: "Please enter Y, N, or T: ~" TYPE=HOTKEY VAR=Z VALID="YNTynt"
IfCase: %Z% = "Y" ;yes, turn ANSI on
Change: ANSI=X
EndIf:
IfCase: %Z% = "N" ;no, turn ANSI off
Change: ANSI=.
EndIf:
IfCase: %Z% = "T" ;test the ANSI capability
Change: ANSI=X
Show: "^[[01;37;40m^[[H^[[2J~"
Clear:
Show: ""
Show: "The following is a test of your capabilities to use ANSI color:"
Show: ""
Show: ""
Show: "
****
****
****
"
Show: ""
Show: ""
Show: "The above should have cleared your screen, and displayed 3 sets "
Show: "of stars. If you have a color screen, then each set of stars"
Show: "would have been on a different colored background."
Show: ""
Show: "(If you saw *ANY* strange sequences like '[01;37;41m' then you"
Show: "do NOT have an ANSI capability)"
Show: ""
Show: ""
Show: "Did the above test display correctly (Y/N)? "
Get: "Please enter Y, or N: ~" TYPE=HOTKEY VAR=Z VALID="YNyn"
IfCase: %Z% = "Y"
Change: ANSI=X
Else:
Change: ANSI=.
Endif:
Endif: ; %Z% = "T" (test the ANSI capability)
Clear:
Show: ""
Show: "IBM Graphics Usage:"
Show: "==================="
Show: ""
Show: "You may now select whether you wish to use IBM graphics"
Show: "characters (eg box-drawing characters). To do this, you MUST"
Show: "be running your system with 8-bit data, and NO parity."
Show: ""
Show: "If you do NOT choose to use IBM characters, then this bbs will"
Show: "use equivalent textual characters to draw boxes."
Show: ""
Show: "(If you have any doubt about the ability of your system to use"
Show: "IBM graphics characters, then press a T now to run a test.)"
Show: ""
Show: ""
Show: ""
Show: "Would you like to use IBM graphics: Yes, No or Test it?"
Get: "Please enter Y, N, or T: ~" TYPE=HOTKEY VAR=Z VALID="YNTynt"
IfCase: %Z% = "Y" ;yes, turn IBM on
Change: IBM=X
EndIf:
IfCase: %Z% = "N" ;no, turn IBM off
Change: IBM=.
EndIf:
IfCase: %Z% = "T" ;test it, please
Change: IBM=X ; need IBM on to test...
Clear:
Show: ""
Show: "The following is a test of your capabilities to display"
Show: "IBM graphics characters:"
Show: ""
Show: " ┌──────────────────────────────────────┐"
Show: " │╔════════════════════════════════════╗│"
Show: " │║ Test ░░░░ Test ▒▒▒▒ Test ▓▓▓▓ Test ║│"
Show: " │╚════════════════════════════════════╝│"
Show: " └──────────────────────────────────────┘"
Show: ""
Show: ""
Show: "The above should have cleared your screen, and displayed the"
Show: "word 'Test' four times, separated by patterned rectangles,"
Show: "inside two boxes, one with a double border, the other with a"
Show: "single border"
Show: ""
Show: "(If you saw strange (or normal) textual characters, then you"
Show: "do NOT have an IBM Graphics capability)"
Show: ""
Show: ""
Show: "Did the above test display correctly (Y/N)? "
Get: "Please enter Y, or N: ~" TYPE=HOTKEY VAR=Z VALID="YNyn"
IfCase: %Z% = "Y"
Change: IBM=X
Show: ""
Show: ""
Show: "IBM graphics characters have been turned on."
Show: ""
Get: "Press any key to continue ... ~" TYPE=HOTKEY VAR=Z
Else:
Change: IBM=. ; test failed
Endif: ; %Z% = "Y"
Endif: ; %Z% = "T" (test for graphics)
;
; This will correctly set the user's page length
;
Clear:
Show: ""
Show: ""
Show: ""
Show: "Screen length:"
Show: "=============="
Show: ""
Show: "This test will correctly set the number of lines per page"
Show: "that your terminal can handle."
Show: ""
Get: "Please press a key to start the test...." TYPE=HOTKEY VAR=Z
Change: PageLen=255
;
;
Show: "30"
Show: "29"
Show: "28"
Show: "27"
Show: "26"
Show: "25"
Show: "24"
Show: "23"
Show: "22"
Show: "21"
Show: "20"
Show: "19"
Show: "18"
Show: "17"
Show: "16"
Show: "15"
Show: "14"
Show: "13"
Show: "12"
Show: "11"
Show: "10"
Show: " 9"
Show: " 8"
Show: " 7"
Show: " 6"
Show: " 5"
Show: " 4"
Show: " 3"
Show: " 2"
Get: " 1 Which number is on the TOP LINE of your screen? ~"
TYPE=STRING LENGTH=2 VAR=Z
IFNUM: %Z%>0
Change: PageLen=%Z%
ENDIF:
IFNUM: %Z%=0
Change: PageLen=24
ENDIF:
; This makes certain MY ANSI SCREENS won't come back wrapped and garbled
IFNUM: %PAGELEN%<23
Change: ANSI=.
ENDIF:
;
; This will correctly set the user's page Width
;
Clear:
Show: ""
Show: ""
Show: ""
Show: "Screen Width:"
Show: "=============="
Show: ""
Show: "This last test will correctly set the number of Columns across"
Show: "that your terminal can handle."
Show: ""
Get: "Please press a key to start the test...." TYPE=HOTKEY VAR=Z
Change: WIDTH=80
;
;
Show: "........10........20........30........40........50........60........70.......80"
Show: ""
Show: ""
Show: ""
Get: "What is the last number on the FAR RIGHT of your screen? ~"
TYPE=STRING LENGTH=2 VAR=Z
IFNUM: %Z%>0
Change: WIDTH=%Z%
ENDIF:
; This makes certain MY ANSI SCREENS won't come back wrapped and garbled
IFNUM: %WIDTH%<80
Change: ANSI=.
ENDIF:
; Last, but not least, we change the A1(1) flag to indicate that this
; is no longer a first time user. This will prevent the user from
; hitting this QAL again at logon. You may make this flag anything
; you'd like.
;
; A1(1) = . indicates first time user.
; A1(1) = X indicates existing user.
Change: A1=X-------
Quit:
EndQ&A:
;=================================================================